package com.running.base.run.exception.enums;


import com.running.base.run.exception.BaseErrorInfoInterface;

public enum CommonEnum implements BaseErrorInfoInterface {

    SUCCESS("0", "接口调用成功"),
    FAILED("-1", "系统错误"),
    NO_TOKEN("401","无效的令牌"),
    PARAM_NOT_MATCH("400","缺少参数"),
    SIGNATURE_NOT_MATCH("406","非法的请求"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误"),

    NO_USER("000602","用户不存在!"),
    NO_USER_PASS("000603","用户密码不正确，请重新登录！"),
    USER_JWT_EXPIRED("000604","用户token过期，请重新登录！"),
    NO_REGISTER_SMS_CODE("000605", "短信验证码为空"),
    NO_REGISTER_EMAIL("000606", "注册邮箱为空"),
    NO_REGISTER_PASSWORD("000607", "用户密码为空"),
    USER_EXIST("000608", "该手机号已经注册"),
    EMAIL_EXIST("000609", "该邮箱已经注册"),
    NO_EMAIL("000610","用户邮箱不存在!"),
    NO_REGISTER_EMAIL_CODE("000611", "邮箱验证码为空"),
    INVALID_EMAIL_CODE("000612", "邮箱验证码不正确!"),
    NO_PHOTO_CODE("000613", "请输入正确的图形验证码!"),
    SMS_SEND_ERROR("000614", "短信验证码发送失败，请稍后再试!"),
    NO_SMS_SEND("000615", "请获取短信验证码!"),
    SMS_SEND_WRONG("000616", "短信验证码不正确!"),
    NO_EMAIL_SEND("000617", "邮箱验证码已过期，请获取邮箱验证码!"),
    EMAIL_SEND_ERROR("000618", "邮件验证码发送失败，请稍后再试!"),
    EMAIL_NOT_CORRECT("10001", "参数错误（email）"),
    MOBILE_NOT_CORRECT("10001", "参数错误（mobile）"),
    URL_POST_EXCEPTION("405","不允许使用POST请求该接口，请参考接口文档。"),
    URL_GET_EXCEPTION("405","不允许使用GET请求该接口，请参考接口文档。"),
    URL_EXCEPTION("404","无效的访问路径"),
    LOGIN_FAILED("10004","登录失败，请稍后重试"),
    LOGOUT_FAILED("10005","退出失败"),
    SOURCE_URL_NOT_CORRECT("10001", "参数格式错误（sourceUrl）"),
    ;

    /** 错误码 */
    private String resultCode;

    /** 错误描述 */
    private String resultMsg;

    CommonEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return this.resultCode;
    }

    @Override
    public String getResultMsg() {
        return this.resultMsg;
    }
}
